﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace E.Enum
{
    public class EnumClass
    {
        public static IDictionary<int, string> GetExamCategoryList()
        {
            Dictionary<int, string> list = new Dictionary<int, string>();
            list.Add((int)EnumExamCategory.CourseExam, "课程测验");
            list.Add((int)EnumExamCategory.CertificateExam, "综合测验");
            return list;
        }

        public static string GetExamCategoryName(EnumExamCategory categoryid)
        {
            string name = "";
            switch (categoryid)
            {
                case EnumExamCategory.CertificateExam:
                    name = "综合测试";
                    break;
                case EnumExamCategory.CourseExam:
                    name = "课程测验";
                    break;
                default: break;
            }
            return name;
        }

        #region Score Category

        public static IDictionary<EnumScoreCategory, string> GetScoreCategoryList()
        {
            Dictionary<EnumScoreCategory, string> list = new Dictionary<EnumScoreCategory, string>();
            list.Add(EnumScoreCategory.OralScore, "口试成绩");
            list.Add(EnumScoreCategory.UsuallyScore, "课堂表现成绩");
            list.Add(EnumScoreCategory.OperationScore, "录入成绩");
            list.Add(EnumScoreCategory.TestScore, "课程考试成绩");
            list.Add(EnumScoreCategory.CertificateTestScore, "认证考试成绩");
            return list;
        }

        public static IDictionary<int, string> GetInputScoreCategoryList()
        {
            Dictionary<int, string> list = new Dictionary<int, string>();
            list.Add((int)EnumScoreCategory.OralScore, "口试成绩");
            list.Add((int)EnumScoreCategory.OperationScore, "录入成绩");
            list.Add((int)EnumScoreCategory.UsuallyScore, "课堂表现成绩");
            return list;
        }

        public static IList<EnumScoreCategory> GetInputScoreCategoryIList()
        {
            IList<EnumScoreCategory> list = new List<EnumScoreCategory>();
            list.Add(EnumScoreCategory.OralScore);
            list.Add(EnumScoreCategory.OperationScore);
            list.Add(EnumScoreCategory.UsuallyScore);
            return list;
        }

        public static string GetInputScoreCategoryName(EnumScoreCategory category)
        {
            string name = "";
            switch (category)
            { 
                case EnumScoreCategory.OperationScore:
                    name = "录入成绩";
                    break;
                case EnumScoreCategory.OralScore:
                    name = "口试成绩";
                    break;
                case EnumScoreCategory.TestScore:
                    name = "课程考试成绩";
                    break;
                case EnumScoreCategory.CertificateTestScore:
                    name = "认证考试成绩";
                    break;
                case EnumScoreCategory.UsuallyScore:
                    name = "课堂表现成绩";
                    break;
                default:
                    name = "未录入";
                    break;
            }
            return name;
        }

        #endregion

        public static IDictionary<int, string> GetAuthorityList(int a)
        {
            IDictionary<int, string> list = new Dictionary<int, string>();
            if (a != -1)
            {
                list.Add((int)EnumTeacherAuthority.Admin, "管理员");
            }
            list.Add((int)EnumTeacherAuthority.Normal, "普通教师");
            list.Add((int)EnumTeacherAuthority.Internals, "内训教师");
            return list;
        }

        public static string GetAuthorityTitle(EnumTeacherAuthority authority)
        {
            string title = "";
            switch (authority)
            {
                case EnumTeacherAuthority.Normal:
                    title = "普通教师";
                    break;
                case EnumTeacherAuthority.Admin:
                    title = "管理员";
                    break;
                case EnumTeacherAuthority.Internals:
                    title = "内训教师";
                    break;
                default: break;
            }
            return title;
        }
    }
}
